package com.fafa.File.work;

import java.io.File;
import java.io.IOException;

public class CreateMyTemp {
    public static void main(String[] args) throws IOException {
        File file = new File("E:\\temp");
        if(!file.exists())
        {
            System.out.println("文件夹不存在");
            file.mkdir();
        }
        String path = "E:\\temp\\hello.txt";
        File file1 = new File(path);
        if(!file1.exists())
        {
            System.out.println("文件不存在");
            file1.createNewFile();
        }

    }
}
